package com.koc.robot;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;
import android.view.MotionEvent;

public class BasicGLSurfaceView extends GLSurfaceView
{
	private BasicRenderer mRender;
	
	public BasicGLSurfaceView(Context context)
	{
		super(context);
		mRender = new BasicRenderer(context);
		setRenderer(mRender);
	}
	
	public BasicGLSurfaceView(Context context, AttributeSet attrs)
	{
		super(context, attrs);
		mRender = new BasicRenderer(context);
		setRenderer(mRender);
	}
	
	@Override
	public boolean onTouchEvent(MotionEvent e) 
	{
		mRender.onTouched(e);
		
		return true;
	}
	
	public void onButtonClicked(int buttonId)
	{
		mRender.onButtonClicked(buttonId);
	}
}
